package com.szly.phm.common.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.szly.phm.common.entity.dto.system.SysMessagePageDTO;
import com.szly.phm.common.entity.dto.user.*;
import com.szly.phm.common.entity.po.SysUser;
import com.szly.phm.common.entity.result.PageResult;
import com.szly.phm.common.entity.result.RootResponse;
import com.szly.phm.common.entity.vo.user.UserPageVO;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author admin
 * @since 2021-07-02
 */
public interface ISysUserService extends IService<SysUser> {

    /**
     * @ Description   :  根据名称查询用户
     * @ Author        :  pw
     * @ Date          :  2021/7/5
     */
    SysUser queryUserByUsername(String username);

    /**
     * @ Description   :  新建用户
     * @ Author        :  pw
     * @ Date          :  2021/7/5
     */
    RootResponse createUser(CreateUserDTO userDTO, LoginUserDTO loginDTO);

    /**
     * @ Description   :  编辑用户
     * @ Author        :  pw
     * @ Date          :  2021/7/5
     */
    RootResponse updateUser(UpdateUserDTO userDTO, LoginUserDTO loginDTO);

    RootResponse  updateHeaderName(UpdateUserHeaderDTO userDTO, LoginUserDTO loginDTO);
    /**
     * @ Description   :  删除用户
     * @ Author        :  pw
     * @ Date          :  2021/7/5
     */
    RootResponse deleteUser(String id, LoginUserDTO loginDTO);

    /**
     * @ Description   :  分页查询用户列表
     * @ Author        :  pw
     * @ Date          :  2021/7/5
     */
    RootResponse<PageResult<UserPageVO>> queryUserPage(UserPageDTO pageDTO);
    RootResponse queryUserLongin(VerificationUserDTO verificationUserDTO);
    /**
     * @ Description   :  重置密码
     * @ Author        :  pw
     * @ Date          :  2021/7/5
     */
    RootResponse resetPassword(String id, LoginUserDTO loginDTO);

    /**
     * @ Description   :  修改密码
     * @ Author        :  pw
     * @ Date          :  2021/7/5
     */
    RootResponse updatePassword(UpdatePasswordDTO passwordDTO, LoginUserDTO loginDTO);

    RootResponse  createUsersRoles(UserRoleDTO roleDTO , LoginUserDTO loginDTO);

    RootResponse queryUserRoles(String userId);

    RootResponse selectSysMessages(SysMessagePageDTO teachDataTypePageDTO, LoginUserDTO userDTO);
//
    RootResponse selectSysMessagesNotCount(LoginUserDTO userDTO);
    RootResponse selectSysMessagesSetRead(LoginUserDTO userDTO,String id);
    RootResponse   selectSysMessagesSetAllRead(LoginUserDTO userDTO);
}
